{% extends "common.html" %}
{% load i18n %}
{% block css %}
<script src="/static/js/laydate.js"></script>
<link href="/static/css/bootstrap.css" rel="stylesheet" type="text/css">
 <script type="text/javascript" charset="utf-8" src="/static/js/ueditor.config.js"></script>
 <script type="text/javascript" charset="utf-8" src="/static/js/ueditor.all.min.js"> </script>
{% endblock %}
{% block content %}
<style type="text/css">
  .laydate_box, .laydate_box * {
        box-sizing:content-box;
    }
</style>

<div class="wrap" style="width:1200px ">
    <div class="form-horizontal text-left">
         <form method="post" action="{% url "work" %}" id="pickupForm">
       {% csrf_token %}
      <div class="form-group">
       
      </div>
      <div class="form-group">
    <label class="col-sm-2 control-label">{% trans "company" %}:</label>
        <div class="col-sm-4">
          <input type="text" class="form-control" name="name" value="{{name}}">
        </div>
        
      </div>

      <div class="form-group">
        <label class="col-sm-2 control-label">{% trans "job" %}:</label>
        <div class="col-sm-4">
          <input type="text" class="form-control" name="title" value="{{title}}">
        </div>
      </div>



      <div class="form-group ">
    <label class="col-sm-2 control-label">{% trans "work time" %}:</label>
        <div class="input-group col-sm-4" style="padding-left: 15px;">
          
  <input type="text" class=" form-control col-sm-2" name="startTime" value="{{startTime|date:"Y-m-d"}}" onclick="laydate()">
       
           <div class="input-group-addon">~</div>
       
    <input type="text" class="form-control col-sm-4" name="endTime" value="{{endTime|date:"Y-m-d"}}" onclick="laydate()">
      

        </div>

        


      </div>
      

     <input type="hidden" name="id" value="{{id}}">

      <div class="form-group">
        <label class="col-sm-2 control-label">{% trans "responsibilities" %}:</label>
        <div class="col-sm-5">
          
       <!--    <textarea name="content" class="form-control" style="height:90px">{{content}}</textarea> -->

           <script type="text/plain" id="content" style="width:600px;height:500px;">
        {{content|safe}}
    </script>

        </div>
      </div>

      


    

      

      





      

      

      

  
<div class="form-group">
        <label class="col-sm-2 control-label"></label>
        <div class="col-sm-2">
         <input class="btn btn-default blue col-sm-6"  type="submit" value="{% trans "submit" %}">


        </div>
      </div>
   </form>

    </div>



 </div>  
 </form>
 <script type="text/javascript">
$(document).ready(function() {
    $('#pickupForm')
        .bootstrapValidator({
            message: 'This value is not valid',
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            fields: {
                title: {
                    message: 'The postal code is not valid',
                    validators: {
                        notEmpty: {
                            message: '{% trans "job" %}{% trans "is required and cannot be empty" %}'
                        },
                       
                      
                    }
                },
                 name: {
                    message: 'The name is not valid',
                    validators: {
                        notEmpty: {
                            message: '{% trans "company" %} {% trans "is required and cannot be empty" %}'
                        },
                     
                    }
                },
                 content: {
                    message: 'The name is not valid',
                    validators: {
                        notEmpty: {
                            message: '{% trans "responsibilities" %} {% trans "is required and cannot be empty" %}'
                        },
                     
                    }
                },
                 startTime: {
                    message: 'The name is not valid',
                    validators: {
                        notEmpty: {
                            message: '{% trans "work time" %} {% trans "is required and cannot be empty" %}'
                        },
                     
                    }
                }


            }
        })
      })
  </script>
   <script type="text/javascript">
        UE.getEditor('content',{
            //这里可以选择自己需要的工具按钮名称,此处仅选择如下五个
            toolbars:[['Undo', 'Redo','Bold','test']],
            //focus时自动清空初始化时的内容
             allHtmlEnabled:false,
            autoClearinitialContent:false,
            textarea:'content',
            //关闭字数统计
            wordCount:false,
            //关闭elementPath
            elementPathEnabled:false,
            //默认的编辑区域高度
            initialFrameHeight:300
            //更多其他参数，请参考ueditor.config.js中的配置项
        })
    </script>
  {% endblock %}
 